﻿@*@if(Model.ImageUrl != null && !string.IsNullOrEmpty(Model.ImageUrl)) {
    <img src="@Model.ImageUrl" width="250" />
}*@
<div>
@T("Location"): <b>@Model.Location</b>
<br />
@T("Date"): <b>@Model.Date</b>
<br />
</div>

<div>
    <p>
    @if (HttpContext.Current.Request.IsAuthenticated)
       { 
         @*var test = this.Model.ItemId;*@         
         @Html.ActionLink(T("Register for this event").ToString(), "RegisterForEvent", new { Controller = "Event", Area = "EventManager", userName = HttpContext.Current.User.Identity.Name, contentItemId = this.Model.ItemId}, null)      
       }
       else
       { 
         @Html.ActionLink(T("Log On to register for this event").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl })
       }          
       <br />  
       @if(TempData["message"] != null) 
       {
        <br /><span class="highlight">@TempData["message"]</span><br />      
       }
      </p>     
</div>

<div>
<h5>Attendees presently registered:</h5>
   <p>
    @if (Model.Attendees != null) 
    {
       string[] split = Model.Attendees.Split(',');
           foreach (string item in split)
           {
               <b>@item</b><br />
           }
       }
       else 
       {
        <b>No members are currently registered.</b><br />
       }
    </p>  
 </div>